package org.btik.light.mobile.ui.devs.arm;

import org.btik.light.meta.DevMo;
import org.btik.light.meta.DevState;
import org.btik.light.mobile.meta.DevPanelType;
import org.btik.light.mobile.meta.mo.DevPanelTypeOwner;
import org.btik.light.mobile.mo.MoCreator;
import org.btik.light.mobile.ui.devs.arm.model.ArmMo;

import java.util.Map;

import static org.btik.light.mobile.meta.DevPanelType.Fragment;

public interface ArmMeta {

    /**
     * 操作码数组
     */
    int OP_CODE_ARM_POS = 3;

    String DEFAULT_SAFE_POS = "50";

    class ArmMoCreator implements MoCreator, DevPanelTypeOwner {
        @Override
        public DevMo create(String sn, Map<String, String> attr) {
            ArmMo armMo = new ArmMo(sn, DevState.CONNECTED);
            armMo.setDevPanelType(Fragment);
            armMo.setExtendedAttributes(attr);
            return armMo;
        }

        @Override
        public DevPanelType devPanelType() {
            return Fragment;
        }
    }



}
